package com.jg.comm.api;

/**
 * @description: 定义响应结果码
 * @author 86130
 * @date
 * @version 1.0
 */
public enum ResultCode {
    SUCCESS(200, "成功"),
    FAIL(500, "失败"),
    VALIDATE_FAILED(400, "参数验证失败"),
    NOT_FOUND(404, "未找到"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问"),
    METHOD_NOT_ALLOWED(405, "请求方法不允许"),
    NOT_ACCEPTABLE(406, "请求格式错误"),
    REQUEST_TIMEOUT(408, "请求超时"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误"),
    BAD_GATEWAY(502, "网关错误");
    private int code;
    private String message;
    ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }
    public int getCode() {
        return code;
    }
    public String getMessage() {
        return message;
    }
}
